import {createStore} from 'vuex'

const store = createStore({
    state() {
        return {
            username: '123123'
        }
    },
    mutations: {
        changeUsername(state, newName) {
            state.username = newName // 更新变量的值
        }
    }
})
export default store